package com.yonyou.cyxdms.basedata.service.service.sap;

import com.alibaba.fastjson.JSON;
import com.yonyou.cyx.framework.bean.dto.framework.RestResultResponse;
import com.yonyou.cyxdms.basedata.service.config.annotation.InterfaceLog;
import com.yonyou.cyxdms.basedata.service.dto.sap.SapConfigOptionOutDto;
import com.yonyou.cyxdms.basedata.service.dto.sap.SapOptionInDto;
import com.yonyou.cyxdms.basedata.service.dto.sap.SapProOutDto;
import com.yonyou.cyxdms.basedata.service.dto.sap.SapProductInDto;
import com.yonyou.cyxdms.basedata.service.feign.SapProductClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class SapCxfClientService {

    @Autowired
    SapProductClient sapProductClient;

    @InterfaceLog
    public RestResultResponse<SapConfigOptionOutDto> getOptionRest(String batchNo, String interfaceNo, SapOptionInDto sapOptionInDto){
        RestResultResponse<SapConfigOptionOutDto> res = null;
        res = sapProductClient.getOptionInfo(sapOptionInDto);
        return res;
    }

    @InterfaceLog
    public RestResultResponse<SapProOutDto> getProductRest(String batchNo, String interfaceNo, SapProductInDto sapProductInDto){
        RestResultResponse<SapProOutDto> res = null;
        res = sapProductClient.getProductInfo(sapProductInDto);
        return res;
    }

}
